A capacitance detecting device disclosed in JP 2005-106665A (Reference 1) includes a first capacitor and a second capacitor connected in series to each other between a first power source and a second power source. A first switch is connected between terminals of the first capacitor. A second switch is connected between the first capacitor and the second capacitor. A third switch is connected between terminals of the second capacitor.
In this capacitance detecting device, firstly, only the first switch is controlled to turn on. Accordingly, the first capacitor is discharged so that the potentials of the terminals of the first capacitor become equal to the potential of the first power source together. Thereafter, only the second switch is controlled to turn on. Accordingly, the potential of the terminal of the first switch on the second capacitor side is lowered, and the second capacitor is charged. Thereafter, only the third switch is controlled to turn on. Accordingly, the second capacitor is discharged. As the control of switching on the second switch and the control of switching on the third switch are alternately repeated, the potential of the terminal of the first capacitor on the second capacitor side is gradually reduced. A change in the capacitance of the second capacitor is detected based on the number of times by which the second switch is controlled to turn on until this potential is less than a reference potential.
Electromagnetic noise is mixed in a circuit of a capacitance detecting device disclosed in Reference 1. When a potential of a terminal of a first capacitor on a second capacitor side changes due to the electromagnetic noise, it may be erroneously determined due to the change that the potential reaches a reference potential or does not reach the reference potential. When such erroneous determination is made, detection accuracy of the change in the capacitance of the second capacitor deteriorates.